package com.heima.model.admin.pojos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/*
 *@auther szh
 *@create 2021/4/10
 *@time 18:49
 */
@Data
@TableName("ad_channel")
public class AdChannel implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField(value = "name")
    private String name;  //频道名称

    @TableField(value = "description")
    private String description; //频道描述

    @TableField("is_default")
    private boolean is_default;//是否默认频道

    @TableField("status")
    private boolean status;

    @TableField("ord")
    private Integer ord ;//默认排序

    @TableField("created_time")
    private Date created_time;//创建时间

    public void setDescription(String description) {
        this.description = description == null ? "无":description;
    }

    public String getDescription() {
        return description == null ? "无":description;
    }
}
